{% extends "index.html" %}
<link rel="stylesheet" type="text/css" href="media/css/form.css">
<link rel="stylesheet" type="text/css" href="media/css/tbmenu.css">

{% block js_content %}
onLoad="dev_disable(document.getElementsByName('zincir'),document.getElementsByName('kaynak_aygit'),document.getElementsByName('hedef_aygit'))"
{% endblock %}

{% block ip_content %}

{% if not rule_id %}
<form action="/iptables/rule/add/" method="post">
{% endif %}
{% if rule_id %}
<form action="/iptables/rule/{{rule_id}}/edit/" method="post">
{% endif %}

	<div id="container">
		<div id="kutubaslik"><strong>Kural Düzenleme Formu</strong></div>	
		<br/>
		<br/>
		<br/>
		{% if rule_id %}
		<ul id="menut">
			<li><a href="/iptables/rule/{{rule_id}}/add/tcp/">Tcp Ekle</a></li>
			<li><a href="/iptables/rule/{{rule_id}}/add/udp/">Udp Ekle</a></li>
			<li><a href="/iptables/rule/{{rule_id}}/add/icmp/">Icmp Ekle</a></li>
			<li><a href="/iptables/rule/{{rule_id}}/add/extra/">Extra Ekle</a></li>
			<li><a href="/iptables/rule/{{rule_id}}/add/prefix/">Log Ekle</a></li>
			
		</ul>
		<br>
		<br>
		<br>
		<br>
		<br>
		{% endif %}
		
		<div id="leftcolumn">
			{{form.name.label}}:{{form.name}}		
			</div>

			<div id="rightcolumn">
			
			{{form.yukle.label}}:{{form.yukle}}
			
			</div>

			<div id="leftcolumn">
			
			{{form.zincir.label}}:{{form.zincir}}

			
			
			</div>

			<div id="rightcolumn">
			
			{{form.eylem.label}}:{{form.eylem}}

			
			</div>

	<div id="leftcolumn">

		{{form.kaynak_ip.label}}{{form.kaynak_ip}}
			
			</div>

			<div id="rightcolumn">
			
			{{form.hedef_ip.label}}:{{form.hedef_ip}}

			
			</div>

<div id="leftcolumn">
	{{form.kaynak_aygit.label}}:{{form.kaynak_aygit}}
				
			
			</div>

			<div id="rightcolumn">
			
	{{form.hedef_aygit.label}}:{{form.hedef_aygit}}
			
			</div>




<div align="center"><input type="submit" value="Kaydet"/></div>
		</div>	


</form>
	<br/>
	{% if rule_id %}
		{% if d_rule %}
			<div id="kural">{{d_rule}}</div>
		{% endif %}
	{% endif %}

	{% if flash.error %}<div id="hata">Hata var :{{ flash.error }}</div>{% endif %}

	{% if hatalar %}
		<div id="hata">{{hatalar}}</div>
	{% endif %}

{% if form.errors %}
<div id="hata">
	
	{{form.errors}}

</div>
{% endif %}
</div>

{% endblock %}